<?php

mysql_connect("localhost", "root", "n2pl") or die(mysql_error());
mysql_select_db("isb") or die(mysql_error())

public void action_getAccountHistory(){
	try{
		$id = req('id');
		
		$transactions = mysql_query("SELECT * FROM transactions WHERE customer_id=$id");
		
		$response['success'] = true;
		$response['transactions'] = $transactions;
	}
	catch(exception $e){
		$response['success'] = false;
		$response['message'] = $e;
	}
	
	json_reply($response);
	
}

public void action_getBalance(){
	try{
		$id = req('id');
		
		$balance = mysql_query("SELECT AccountType,CurrentBalance,LastModifiedDateTime FROM account WHERE customer_id=$id");
		
		$response['success'] = true;
		$response['balance'] = $balance;
	
	}
	catch (exception $e){
		$response['success'] = false;
		$response['message'] = $e;
	}
	
	json_reply($response):
}

?>